3.1.80 \(\int (g+h x) \sqrt {a+c x^2} (d+e x+f x^2) \, dx\) [80]

3.1.80.1 Optimal result
3.1.80.2 Mathematica [A] (verified)
3.1.80.3 Rubi [A] (verified)
3.1.80.4 Maple [A] (verified)
3.1.80.5 Fricas [A] (verification not implemented)
3.1.80.6 Sympy [A] (verification not implemented)
3.1.80.7 Maxima [A] (verification not implemented)
3.1.80.8 Giac [A] (verification not implemented)
3.1.80.9 Mupad [F(-1)]

3.1.80.1 Optimal result

Integrand size = 27, antiderivative size = 175 \[ \int (g+h x) \sqrt {a+c x^2} \left (d+e x+f x^2\right ) \, dx=\frac {(4 c d g-a (f g+e h)) x \sqrt {a+c x^2}}{8 c}+\frac {f (g+h x)^2 \left (a+c x^2\right )^{3/2}}{5 c h}-\frac {\left (4 \left (2 a f h^2+c \left (3 f g^2-5 h (e g+d h)\right )\right )+3 c h (3 f g-5 e h) x\right ) \left (a+c x^2\right )^{3/2}}{60 c^2 h}+\frac {a (4 c d g-a f g-a e h) \text {arctanh}\left (\frac {\sqrt {c} x}{\sqrt {a+c x^2}}\right )}{8 c^{3/2}} \]

output
1/5*f*(h*x+g)^2*(c*x^2+a)^(3/2)/c/h-1/60*(8*a*f*h^2+4*c*(3*f*g^2-5*h*(d*h+ 
e*g))+3*c*h*(-5*e*h+3*f*g)*x)*(c*x^2+a)^(3/2)/c^2/h+1/8*a*(-a*e*h-a*f*g+4* 
c*d*g)*arctanh(x*c^(1/2)/(c*x^2+a)^(1/2))/c^(3/2)+1/8*(4*c*d*g-a*(e*h+f*g) 
)*x*(c*x^2+a)^(1/2)/c
 
3.1.80.2 Mathematica [A] (verified)

Time = 0.49 (sec) , antiderivative size = 145, normalized size of antiderivative = 0.83 \[ \int (g+h x) \sqrt {a+c x^2} \left (d+e x+f x^2\right ) \, dx=\frac {\sqrt {a+c x^2} \left (-16 a^2 f h+a c (40 d h+5 e (8 g+3 h x)+f x (15 g+8 h x))+2 c^2 x (10 d (3 g+2 h x)+x (5 e (4 g+3 h x)+3 f x (5 g+4 h x)))\right )+15 a \sqrt {c} (-4 c d g+a f g+a e h) \log \left (-\sqrt {c} x+\sqrt {a+c x^2}\right )}{120 c^2} \]

input
Integrate[(g + h*x)*Sqrt[a + c*x^2]*(d + e*x + f*x^2),x]
 
output
(Sqrt[a + c*x^2]*(-16*a^2*f*h + a*c*(40*d*h + 5*e*(8*g + 3*h*x) + f*x*(15* 
g + 8*h*x)) + 2*c^2*x*(10*d*(3*g + 2*h*x) + x*(5*e*(4*g + 3*h*x) + 3*f*x*( 
5*g + 4*h*x)))) + 15*a*Sqrt[c]*(-4*c*d*g + a*f*g + a*e*h)*Log[-(Sqrt[c]*x) 
 + Sqrt[a + c*x^2]])/(120*c^2)
 
3.1.80.3 Rubi [A] (verified)

Time = 0.37 (sec) , antiderivative size = 178, normalized size of antiderivative = 1.02, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {2185, 27, 676, 211, 224, 219}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \sqrt {a+c x^2} (g+h x) \left (d+e x+f x^2\right ) \, dx\)

\(\Big \downarrow \) 2185

\(\displaystyle \frac {\int h (g+h x) ((5 c d-2 a f) h-c (3 f g-5 e h) x) \sqrt {c x^2+a}dx}{5 c h^2}+\frac {f \left (a+c x^2\right )^{3/2} (g+h x)^2}{5 c h}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {\int (g+h x) ((5 c d-2 a f) h-c (3 f g-5 e h) x) \sqrt {c x^2+a}dx}{5 c h}+\frac {f \left (a+c x^2\right )^{3/2} (g+h x)^2}{5 c h}\)

\(\Big \downarrow \) 676

\(\displaystyle \frac {\frac {5}{4} h (-a e h-a f g+4 c d g) \int \sqrt {c x^2+a}dx-\frac {\left (a+c x^2\right )^{3/2} \left (2 a f h^2-5 c h (d h+e g)+3 c f g^2\right )}{3 c}-\frac {1}{4} h x \left (a+c x^2\right )^{3/2} (3 f g-5 e h)}{5 c h}+\frac {f \left (a+c x^2\right )^{3/2} (g+h x)^2}{5 c h}\)

\(\Big \downarrow \) 211

\(\displaystyle \frac {\frac {5}{4} h (-a e h-a f g+4 c d g) \left (\frac {1}{2} a \int \frac {1}{\sqrt {c x^2+a}}dx+\frac {1}{2} x \sqrt {a+c x^2}\right )-\frac {\left (a+c x^2\right )^{3/2} \left (2 a f h^2-5 c h (d h+e g)+3 c f g^2\right )}{3 c}-\frac {1}{4} h x \left (a+c x^2\right )^{3/2} (3 f g-5 e h)}{5 c h}+\frac {f \left (a+c x^2\right )^{3/2} (g+h x)^2}{5 c h}\)

\(\Big \downarrow \) 224

\(\displaystyle \frac {\frac {5}{4} h (-a e h-a f g+4 c d g) \left (\frac {1}{2} a \int \frac {1}{1-\frac {c x^2}{c x^2+a}}d\frac {x}{\sqrt {c x^2+a}}+\frac {1}{2} x \sqrt {a+c x^2}\right )-\frac {\left (a+c x^2\right )^{3/2} \left (2 a f h^2-5 c h (d h+e g)+3 c f g^2\right )}{3 c}-\frac {1}{4} h x \left (a+c x^2\right )^{3/2} (3 f g-5 e h)}{5 c h}+\frac {f \left (a+c x^2\right )^{3/2} (g+h x)^2}{5 c h}\)

\(\Big \downarrow \) 219

\(\displaystyle \frac {\frac {5}{4} h \left (\frac {a \text {arctanh}\left (\frac {\sqrt {c} x}{\sqrt {a+c x^2}}\right )}{2 \sqrt {c}}+\frac {1}{2} x \sqrt {a+c x^2}\right ) (-a e h-a f g+4 c d g)-\frac {\left (a+c x^2\right )^{3/2} \left (2 a f h^2-5 c h (d h+e g)+3 c f g^2\right )}{3 c}-\frac {1}{4} h x \left (a+c x^2\right )^{3/2} (3 f g-5 e h)}{5 c h}+\frac {f \left (a+c x^2\right )^{3/2} (g+h x)^2}{5 c h}\)

input
Int[(g + h*x)*Sqrt[a + c*x^2]*(d + e*x + f*x^2),x]
 
output
(f*(g + h*x)^2*(a + c*x^2)^(3/2))/(5*c*h) + (-1/3*((3*c*f*g^2 + 2*a*f*h^2 
- 5*c*h*(e*g + d*h))*(a + c*x^2)^(3/2))/c - (h*(3*f*g - 5*e*h)*x*(a + c*x^ 
2)^(3/2))/4 + (5*h*(4*c*d*g - a*f*g - a*e*h)*((x*Sqrt[a + c*x^2])/2 + (a*A 
rcTanh[(Sqrt[c]*x)/Sqrt[a + c*x^2]])/(2*Sqrt[c])))/4)/(5*c*h)
 

3.1.80.3.1 Defintions of rubi rules used

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 211
Int[((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[x*((a + b*x^2)^p/(2*p + 1 
)), x] + Simp[2*a*(p/(2*p + 1))   Int[(a + b*x^2)^(p - 1), x], x] /; FreeQ[ 
{a, b}, x] && GtQ[p, 0] && (IntegerQ[4*p] || IntegerQ[6*p])
 

rule 219
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* 
ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt 
Q[a, 0] || LtQ[b, 0])
 

rule 224
Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], 
x, x/Sqrt[a + b*x^2]] /; FreeQ[{a, b}, x] &&  !GtQ[a, 0]
 

rule 676
Int[((d_.) + (e_.)*(x_))*((f_.) + (g_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_), x 
_Symbol] :> Simp[(e*f + d*g)*((a + c*x^2)^(p + 1)/(2*c*(p + 1))), x] + (Sim 
p[e*g*x*((a + c*x^2)^(p + 1)/(c*(2*p + 3))), x] - Simp[(a*e*g - c*d*f*(2*p 
+ 3))/(c*(2*p + 3))   Int[(a + c*x^2)^p, x], x]) /; FreeQ[{a, c, d, e, f, g 
, p}, x] &&  !LeQ[p, -1]
 

rule 2185
Int[(Pq_)*((d_) + (e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] : 
> With[{q = Expon[Pq, x], f = Coeff[Pq, x, Expon[Pq, x]]}, Simp[f*(d + e*x) 
^(m + q - 1)*((a + b*x^2)^(p + 1)/(b*e^(q - 1)*(m + q + 2*p + 1))), x] + Si 
mp[1/(b*e^q*(m + q + 2*p + 1))   Int[(d + e*x)^m*(a + b*x^2)^p*ExpandToSum[ 
b*e^q*(m + q + 2*p + 1)*Pq - b*f*(m + q + 2*p + 1)*(d + e*x)^q - f*(d + e*x 
)^(q - 2)*(a*e^2*(m + q - 1) - b*d^2*(m + q + 2*p + 1) - 2*b*d*e*(m + q + p 
)*x), x], x], x] /; GtQ[q, 1] && NeQ[m + q + 2*p + 1, 0]] /; FreeQ[{a, b, d 
, e, m, p}, x] && PolyQ[Pq, x] && NeQ[b*d^2 + a*e^2, 0] &&  !(EqQ[d, 0] && 
True) &&  !(IGtQ[m, 0] && RationalQ[a, b, d, e] && (IntegerQ[p] || ILtQ[p + 
 1/2, 0]))
 
3.1.80.4 Maple [A] (verified)

Time = 0.54 (sec) , antiderivative size = 153, normalized size of antiderivative = 0.87

method result size
risch \(-\frac {\left (-24 h f \,c^{2} x^{4}-30 c^{2} e h \,x^{3}-30 c^{2} f g \,x^{3}-8 a c f h \,x^{2}-40 c^{2} d h \,x^{2}-40 c^{2} e g \,x^{2}-15 a e h x c -15 a f g x c -60 c^{2} d g x +16 a^{2} f h -40 a c d h -40 a c e g \right ) \sqrt {c \,x^{2}+a}}{120 c^{2}}-\frac {a \left (a e h +a f g -4 c d g \right ) \ln \left (x \sqrt {c}+\sqrt {c \,x^{2}+a}\right )}{8 c^{\frac {3}{2}}}\) \(153\)
default \(d g \left (\frac {x \sqrt {c \,x^{2}+a}}{2}+\frac {a \ln \left (x \sqrt {c}+\sqrt {c \,x^{2}+a}\right )}{2 \sqrt {c}}\right )+h f \left (\frac {x^{2} \left (c \,x^{2}+a \right )^{\frac {3}{2}}}{5 c}-\frac {2 a \left (c \,x^{2}+a \right )^{\frac {3}{2}}}{15 c^{2}}\right )+\left (e h +f g \right ) \left (\frac {x \left (c \,x^{2}+a \right )^{\frac {3}{2}}}{4 c}-\frac {a \left (\frac {x \sqrt {c \,x^{2}+a}}{2}+\frac {a \ln \left (x \sqrt {c}+\sqrt {c \,x^{2}+a}\right )}{2 \sqrt {c}}\right )}{4 c}\right )+\frac {\left (d h +e g \right ) \left (c \,x^{2}+a \right )^{\frac {3}{2}}}{3 c}\) \(162\)

input
int((h*x+g)*(f*x^2+e*x+d)*(c*x^2+a)^(1/2),x,method=_RETURNVERBOSE)
 
output
-1/120*(-24*c^2*f*h*x^4-30*c^2*e*h*x^3-30*c^2*f*g*x^3-8*a*c*f*h*x^2-40*c^2 
*d*h*x^2-40*c^2*e*g*x^2-15*a*c*e*h*x-15*a*c*f*g*x-60*c^2*d*g*x+16*a^2*f*h- 
40*a*c*d*h-40*a*c*e*g)/c^2*(c*x^2+a)^(1/2)-1/8*a/c^(3/2)*(a*e*h+a*f*g-4*c* 
d*g)*ln(x*c^(1/2)+(c*x^2+a)^(1/2))
 
3.1.80.5 Fricas [A] (verification not implemented)

Time = 0.45 (sec) , antiderivative size = 329, normalized size of antiderivative = 1.88 \[ \int (g+h x) \sqrt {a+c x^2} \left (d+e x+f x^2\right ) \, dx=\left [\frac {15 \, {\left (a^{2} e h - {\left (4 \, a c d - a^{2} f\right )} g\right )} \sqrt {c} \log \left (-2 \, c x^{2} + 2 \, \sqrt {c x^{2} + a} \sqrt {c} x - a\right ) + 2 \, {\left (24 \, c^{2} f h x^{4} + 40 \, a c e g + 30 \, {\left (c^{2} f g + c^{2} e h\right )} x^{3} + 8 \, {\left (5 \, c^{2} e g + {\left (5 \, c^{2} d + a c f\right )} h\right )} x^{2} + 8 \, {\left (5 \, a c d - 2 \, a^{2} f\right )} h + 15 \, {\left (a c e h + {\left (4 \, c^{2} d + a c f\right )} g\right )} x\right )} \sqrt {c x^{2} + a}}{240 \, c^{2}}, \frac {15 \, {\left (a^{2} e h - {\left (4 \, a c d - a^{2} f\right )} g\right )} \sqrt {-c} \arctan \left (\frac {\sqrt {-c} x}{\sqrt {c x^{2} + a}}\right ) + {\left (24 \, c^{2} f h x^{4} + 40 \, a c e g + 30 \, {\left (c^{2} f g + c^{2} e h\right )} x^{3} + 8 \, {\left (5 \, c^{2} e g + {\left (5 \, c^{2} d + a c f\right )} h\right )} x^{2} + 8 \, {\left (5 \, a c d - 2 \, a^{2} f\right )} h + 15 \, {\left (a c e h + {\left (4 \, c^{2} d + a c f\right )} g\right )} x\right )} \sqrt {c x^{2} + a}}{120 \, c^{2}}\right ] \]

input
integrate((h*x+g)*(f*x^2+e*x+d)*(c*x^2+a)^(1/2),x, algorithm="fricas")
 
output
[1/240*(15*(a^2*e*h - (4*a*c*d - a^2*f)*g)*sqrt(c)*log(-2*c*x^2 + 2*sqrt(c 
*x^2 + a)*sqrt(c)*x - a) + 2*(24*c^2*f*h*x^4 + 40*a*c*e*g + 30*(c^2*f*g + 
c^2*e*h)*x^3 + 8*(5*c^2*e*g + (5*c^2*d + a*c*f)*h)*x^2 + 8*(5*a*c*d - 2*a^ 
2*f)*h + 15*(a*c*e*h + (4*c^2*d + a*c*f)*g)*x)*sqrt(c*x^2 + a))/c^2, 1/120 
*(15*(a^2*e*h - (4*a*c*d - a^2*f)*g)*sqrt(-c)*arctan(sqrt(-c)*x/sqrt(c*x^2 
 + a)) + (24*c^2*f*h*x^4 + 40*a*c*e*g + 30*(c^2*f*g + c^2*e*h)*x^3 + 8*(5* 
c^2*e*g + (5*c^2*d + a*c*f)*h)*x^2 + 8*(5*a*c*d - 2*a^2*f)*h + 15*(a*c*e*h 
 + (4*c^2*d + a*c*f)*g)*x)*sqrt(c*x^2 + a))/c^2]
 
3.1.80.6 Sympy [A] (verification not implemented)

Time = 0.53 (sec) , antiderivative size = 258, normalized size of antiderivative = 1.47 \[ \int (g+h x) \sqrt {a+c x^2} \left (d+e x+f x^2\right ) \, dx=\begin {cases} \sqrt {a + c x^{2}} \left (\frac {f h x^{4}}{5} + \frac {x^{3} \left (c e h + c f g\right )}{4 c} + \frac {x^{2} \left (\frac {a f h}{5} + c d h + c e g\right )}{3 c} + \frac {x \left (a e h + a f g - \frac {3 a \left (c e h + c f g\right )}{4 c} + c d g\right )}{2 c} + \frac {a d h + a e g - \frac {2 a \left (\frac {a f h}{5} + c d h + c e g\right )}{3 c}}{c}\right ) + \left (a d g - \frac {a \left (a e h + a f g - \frac {3 a \left (c e h + c f g\right )}{4 c} + c d g\right )}{2 c}\right ) \left (\begin {cases} \frac {\log {\left (2 \sqrt {c} \sqrt {a + c x^{2}} + 2 c x \right )}}{\sqrt {c}} & \text {for}\: a \neq 0 \\\frac {x \log {\left (x \right )}}{\sqrt {c x^{2}}} & \text {otherwise} \end {cases}\right ) & \text {for}\: c \neq 0 \\\sqrt {a} \left (d g x + \frac {f h x^{4}}{4} + \frac {x^{3} \left (e h + f g\right )}{3} + \frac {x^{2} \left (d h + e g\right )}{2}\right ) & \text {otherwise} \end {cases} \]

input
integrate((h*x+g)*(f*x**2+e*x+d)*(c*x**2+a)**(1/2),x)
 
output
Piecewise((sqrt(a + c*x**2)*(f*h*x**4/5 + x**3*(c*e*h + c*f*g)/(4*c) + x** 
2*(a*f*h/5 + c*d*h + c*e*g)/(3*c) + x*(a*e*h + a*f*g - 3*a*(c*e*h + c*f*g) 
/(4*c) + c*d*g)/(2*c) + (a*d*h + a*e*g - 2*a*(a*f*h/5 + c*d*h + c*e*g)/(3* 
c))/c) + (a*d*g - a*(a*e*h + a*f*g - 3*a*(c*e*h + c*f*g)/(4*c) + c*d*g)/(2 
*c))*Piecewise((log(2*sqrt(c)*sqrt(a + c*x**2) + 2*c*x)/sqrt(c), Ne(a, 0)) 
, (x*log(x)/sqrt(c*x**2), True)), Ne(c, 0)), (sqrt(a)*(d*g*x + f*h*x**4/4 
+ x**3*(e*h + f*g)/3 + x**2*(d*h + e*g)/2), True))
 
3.1.80.7 Maxima [A] (verification not implemented)

Time = 0.20 (sec) , antiderivative size = 169, normalized size of antiderivative = 0.97 \[ \int (g+h x) \sqrt {a+c x^2} \left (d+e x+f x^2\right ) \, dx=\frac {{\left (c x^{2} + a\right )}^{\frac {3}{2}} f h x^{2}}{5 \, c} + \frac {1}{2} \, \sqrt {c x^{2} + a} d g x + \frac {a d g \operatorname {arsinh}\left (\frac {c x}{\sqrt {a c}}\right )}{2 \, \sqrt {c}} + \frac {{\left (c x^{2} + a\right )}^{\frac {3}{2}} e g}{3 \, c} + \frac {{\left (c x^{2} + a\right )}^{\frac {3}{2}} d h}{3 \, c} - \frac {2 \, {\left (c x^{2} + a\right )}^{\frac {3}{2}} a f h}{15 \, c^{2}} + \frac {{\left (c x^{2} + a\right )}^{\frac {3}{2}} {\left (f g + e h\right )} x}{4 \, c} - \frac {\sqrt {c x^{2} + a} {\left (f g + e h\right )} a x}{8 \, c} - \frac {{\left (f g + e h\right )} a^{2} \operatorname {arsinh}\left (\frac {c x}{\sqrt {a c}}\right )}{8 \, c^{\frac {3}{2}}} \]

input
integrate((h*x+g)*(f*x^2+e*x+d)*(c*x^2+a)^(1/2),x, algorithm="maxima")
 
output
1/5*(c*x^2 + a)^(3/2)*f*h*x^2/c + 1/2*sqrt(c*x^2 + a)*d*g*x + 1/2*a*d*g*ar 
csinh(c*x/sqrt(a*c))/sqrt(c) + 1/3*(c*x^2 + a)^(3/2)*e*g/c + 1/3*(c*x^2 + 
a)^(3/2)*d*h/c - 2/15*(c*x^2 + a)^(3/2)*a*f*h/c^2 + 1/4*(c*x^2 + a)^(3/2)* 
(f*g + e*h)*x/c - 1/8*sqrt(c*x^2 + a)*(f*g + e*h)*a*x/c - 1/8*(f*g + e*h)* 
a^2*arcsinh(c*x/sqrt(a*c))/c^(3/2)
 
3.1.80.8 Giac [A] (verification not implemented)

Time = 0.27 (sec) , antiderivative size = 175, normalized size of antiderivative = 1.00 \[ \int (g+h x) \sqrt {a+c x^2} \left (d+e x+f x^2\right ) \, dx=\frac {1}{120} \, \sqrt {c x^{2} + a} {\left ({\left (2 \, {\left (3 \, {\left (4 \, f h x + \frac {5 \, {\left (c^{3} f g + c^{3} e h\right )}}{c^{3}}\right )} x + \frac {4 \, {\left (5 \, c^{3} e g + 5 \, c^{3} d h + a c^{2} f h\right )}}{c^{3}}\right )} x + \frac {15 \, {\left (4 \, c^{3} d g + a c^{2} f g + a c^{2} e h\right )}}{c^{3}}\right )} x + \frac {8 \, {\left (5 \, a c^{2} e g + 5 \, a c^{2} d h - 2 \, a^{2} c f h\right )}}{c^{3}}\right )} - \frac {{\left (4 \, a c d g - a^{2} f g - a^{2} e h\right )} \log \left ({\left | -\sqrt {c} x + \sqrt {c x^{2} + a} \right |}\right )}{8 \, c^{\frac {3}{2}}} \]

input
integrate((h*x+g)*(f*x^2+e*x+d)*(c*x^2+a)^(1/2),x, algorithm="giac")
 
output
1/120*sqrt(c*x^2 + a)*((2*(3*(4*f*h*x + 5*(c^3*f*g + c^3*e*h)/c^3)*x + 4*( 
5*c^3*e*g + 5*c^3*d*h + a*c^2*f*h)/c^3)*x + 15*(4*c^3*d*g + a*c^2*f*g + a* 
c^2*e*h)/c^3)*x + 8*(5*a*c^2*e*g + 5*a*c^2*d*h - 2*a^2*c*f*h)/c^3) - 1/8*( 
4*a*c*d*g - a^2*f*g - a^2*e*h)*log(abs(-sqrt(c)*x + sqrt(c*x^2 + a)))/c^(3 
/2)
 
3.1.80.9 Mupad [F(-1)]

Timed out. \[ \int (g+h x) \sqrt {a+c x^2} \left (d+e x+f x^2\right ) \, dx=\int \left (g+h\,x\right )\,\sqrt {c\,x^2+a}\,\left (f\,x^2+e\,x+d\right ) \,d x \]

input
int((g + h*x)*(a + c*x^2)^(1/2)*(d + e*x + f*x^2),x)
 
output
int((g + h*x)*(a + c*x^2)^(1/2)*(d + e*x + f*x^2), x)